// 全局配置项
/**
 *
 * type env =  "development" |  "production"
 *
 * interface requstSetting {
 *  readonly baseUrl: String;
 *  readonly timeout: Number
 *  readonly cookiesExpires: Number
 * }
 *
 *
 * interface Setting extends requstSetting{
 *   readonly ENV: env
 * }
 *
 */

// 接口请求配置
const requstSetting = {
  // 测试环境
  devBaseUrl: "https://daily.credit.joker88.cn/maApi",
  // 正式环境
  proBaseUrl: "https://daily.credit.joker88.cn/maApi",
  timeout: 60000,
  // app内应用logo
  APPLogo: "",
  cdn: {
    /** 获取七牛tokenurl */
    getTokenURL: "https://daily.credit.joker88.cn/maApi",
    /** 七牛文件访问url */
    accessURL: "https://cdn.joker88.cn",
  },
};

const Setting = {
  ...requstSetting,
  ENV: process.env.NODE_ENV,
  // Cookies 默认保存时间，单位：天
  cookiesExpires: 7,
};

export default Setting;
